<!DOCTYPE html>
<html>
<head>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/mytags.jsp"%>
<title>考察申请</title>
<t:base type="jquery,dataTables,lhgdialog"></t:base>
<%@ include file="/jsp/common/common_script.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<script type="text/javascript">
	$(function(){
		//给考察页面赋值
		_set_default_lable_text("sys/LoanInspect/find?loanId=${param.loanId}",false);
		$('#_inspect_detail').dataTable({
			"bProcessing" : true, //DataTables载入数据时，是否显示‘进度’提示
	        "bServerSide" : true, //是否启动服务器端数据导入
	        "bStateSave" : false, //是否打开客户端状态记录功能,此功能在ajax刷新纪录的时候不会将个性化设定回复为初始化状态
	        "bJQueryUI" : true, //是否使用 jQury的UI theme
	        "aLengthMenu" : [5, 10, 15], //更改显示记录数选项
	        "iDisplayLength" : 5, //默认显示的记录数
	        "bAutoWidth" : true, //是否自适应宽度 update\
	        "bScrollCollapse" : false, //是否开启DataTables的高度自适应，当数据条数不够分页数据条数的时候，插件高度是否随数据条数而改变
	        "bPaginate" : true, //是否显示（应用）分页器
	        "bInfo" : true, //是否显示页脚信息，DataTables插件左下角显示记录数
	        "sPaginationType" : "full_numbers", //详细分页组，可以支持直接跳转到某页
	        "bSort" : true, //是否启动各个字段的排序功能
	        "aaSorting" : [[1, "DESC"]], //默认的排序方式，第3列，升序排列
	        "bFilter" : false, //是否启动过滤、搜索功能
	        "sPaginationType": "full_numbers",
		    "sAjaxSource":'sys/SysAccessory/list',
	        "fnServerData":inspectRetrieveData,  //自定义数据获取函数
			"aoColumns" : [ {
				"mDataProp" : "uid",
				"sTitle" : "操作",
				"bSortable": false,
				"sDefaultContent" : "",
				"sClass" : "center",
				"mRender": function (data, display, row) {
			      return  ( '<a href="javascript:down_load('+row.id+');" class="tablelink">'+'浏览或下载'+'</a>'+'&nbsp;&nbsp;');
			    }
				
			}, {
				"mDataProp" : "accessoryTheme",
				"sTitle" : "主题",
				"sDefaultContent" : "",
				"sClass" : "center"
			}, {
				"mDataProp" : "accessoryClass",
				"sTitle" : "附件类型",
				"sDefaultContent" : "",
				"sClass" : "center",
				"mRender": function (data, display, row) {
			        return SYS_BASE_DATA['Accessory_Class_Inspect_Code'][data]||'';
			     }
			}, {
				"mDataProp" : "accessoryName",
				"sTitle" : "文件名",
				"sDefaultContent" : "",
				"sClass" : "center",
				"mRender": function (data, display, row) {
			        return '<a href="javascript:top.down_load('+row.id+');">'+data+'</a>';
			     }
			}, {
				"mDataProp" : "addUser",
				"sTitle" : "上传人",
				"sDefaultContent" : "",
				"sClass" : "center",
				"mRender": function (data, display, row) {
			        return data||'ADMIN';
			     }
			}, {
				"mDataProp" : "addTime",
				"sTitle" : "上传时间",
				"sDefaultContent" : "",
				"sClass" : "center"
			}, {
				"mDataProp" : "accessoryRemark",
				"sTitle" : "备注",
				"sDefaultContent" : "",
				"sClass" : "center"
				
			}
			  
			],
			"oLanguage": {
	            "sUrl":"static_resources/language/lang-cn.txt" //这个是国际化，也就是汉化的各种文字数据源，写对url就行了
	        }
	        
		});
	});
	
	//自定义数据获取函数
	var inspectRetrieveData = function( sSource, aoData, fnCallback ) {
		   aoData.push({'name':'beanProxy[clientId]','value':'${param.clientId}'});
		   aoData.push({'name':'beanProxy[loanId]','value':'${param.loanId}'});
		   aoData.push({'name':"v2hldghlcib0agugzgf0ysbhy2nlc3m",value:1});
		   aoData.push({'name':"beanProxy[ownerType]",value:'KC'});
		        $.ajax( {
		                type: "POST", 
		                url: sSource, 
		                cache : false,
		                dataType : "json",
		                data : aoData, 
		                success: function(resp) {
		                	if(resp && resp.state == 200){
		                		fnCallback(resp.datagrid);
		                		return false;
		                	}
		                	fnCallback(null);
		            }
		        });
	};
</script>
</head>



<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
	    <li><a href="javascript:void(0)">首页</a></li>
	    <li><a href="javascript:void(0)">贷款管理</a></li>
	    <li><a href="javascript:void(0)">贷款审核</a></li>
	    <li><a href="javascript:void(0)">待考察贷款</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    	<div class="formtitle"><span>考察报告附件列表</span></div>
    	<table cellpadding="0" cellspacing="0" border="0" class="tablelist" id="_inspect_detail"></table>
    </div>	
    <div class="formbody">	
    	
    	<div class="formtitle"><span>考察信息详情</span></div>
    	<div class="toolsli">
			<form id="_inspect_detail" name="_inspect_detail" enctype="multipart/form-data" method="post">
    			<ul class="forminfo">
    				<li>
    					<table class="newtablelist" id="">
					        <tbody>
						        <tr>
							        <td class="newtd">考察人员</td>
							        <td><span name="inspectUserName"></span>&nbsp;</td>
							        <td class="newtd">考察费用（元）</td>
							        <td colspan="3"><span name="inspectFee"></span>&nbsp;</td>
						        </tr>
						        <tr>
							        <td class="newtd">待考察事项</td>
							        <td colspan="5"><span name="inspectItem"></span>&nbsp;</td>
						        </tr>
						        <tr>
							        <td class="newtd">考察记录</td>
							        <td colspan="5"><span name="inspectRecord"></span>&nbsp;</td>
						        </tr>
							</tbody>
						</table>					
   					</li>
  	 			</ul>
   			</form>
	    </div>
    </div>
</body>
</html>
